-- GENERATED SPELL FOR [Stoneskin Gargoyle] --


function spell0_16168(pUnit, Event) --@Acid Volley,n/a--
pUnit:FullCastSpellOnTarget(29325,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16168', 24000, 1)
end

function spell1_16168(pUnit, Event) --@Acid Volley,Self--
pUnit:FullCastSpellOnTarget(54714,pUnit)
pUnit:RegisterEvent('Sorts_16168', 24000, 1)
end

function spell2_16168(pUnit, Event) --@Stoneskin,Self--
pUnit:FullCastSpellOnTarget(28995,pUnit)
pUnit:RegisterEvent('Sorts_16168', 13000, 1)
end

function spell3_16168(pUnit, Event) --@Stoneskin,Self--
pUnit:FullCastSpellOnTarget(54722,pUnit)
pUnit:RegisterEvent('Sorts_16168', 13000, 1)
end

function Sorts_16168(pUnit, Event)
local choix_sorts_16168 = math.random(0, 3)
if choix_sorts_16168 == 0 then
pUnit:RegisterEvent('spell0_16168', 1, 1)
end
if choix_sorts_16168 == 1 then
pUnit:RegisterEvent('spell1_16168', 1, 1)
end
if choix_sorts_16168 == 2 then
pUnit:RegisterEvent('spell2_16168', 1, 1)
end
if choix_sorts_16168 == 3 then
pUnit:RegisterEvent('spell3_16168', 1, 1)
end
end

function mob16168_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16168', math.random(1500, 3000), 1)
end

function mob16168_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16168_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16168_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16168, 1, 'mob16168_Action')
RegisterUnitEvent(16168, 2, 'mob16168_Leave')
RegisterUnitEvent(16168, 3, 'mob16168_Kill')
RegisterUnitEvent(16168, 4, 'mob16168_Die')
